package com.lll.test01;

import java.util.regex.*;

public class ChineseCharacterMatcher {
    public static void main(String[] args) {
        String text = "这是一段包含中文的文字，还有标点符号：，。！？《》123abc";
        String regex = "[\\u4e00-\\u9fa5]";
        
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(text);
        
        System.out.println("匹配到的纯中文字符:");
        while (matcher.find()) {
            System.out.print(matcher.group());
        }
    }
}